package geshihua;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;

public class Formatting {

	public static void main(String[] args) {
		FileInputStream fis = null;
		FileOutputStream fos = null;
		try {
			fis = new FileInputStream("src/jd.css");
			fos = new FileOutputStream("src/jd1.css");
			int length = 0;
			while ((length = fis.read()) != -1) {
				fos.write(length);
				if (length == 125) {
					fos.write('\r');
					fos.write('\n');
					if (length == 59) {
						fos.write(' ');
					}
				}
			}
		} catch (Exception e) {

			e.printStackTrace();
		} finally {
			try {
				if (fos != null) {
					fos.close();
				}
			} catch (Exception e) {
				e.printStackTrace();
			}
		}

	}
}
